The Erdős–Anning theorem states that an infinite number of points in the plane can have mutual integer distances only if all the points lie on a straight line. It is named after Paul Erdős and Norman H. Anning, who proved it in 1945.
An alternative way of stating the theorem is that a non-collinear set of points in the plane with integer distances can only be extended by adding finitely many additional points, before no more points can be added. More specifically, if a set of three or more non-collinear points have integer distances, all at most some number d, then at most 4(d + 1)2 points at integer distances can be added to the set.
A set of points on the integer grid with integer distances, to which no more can be added, forms an Erdős–Diophantine graph.
Let A, B and C be non-collinear points with mutual distances D(AB), D(BC) and D(AC) not exceeding d, and X a point at integer distance from A, B and C. From the triangle inequality it follows that |D(AX) − D(BX)| is a non-negative integer not exceeding d. So X is on one of the d + 1 hyperbolas through A and B. Similarly, X is situated on one of the d + 1 hyperbolas through B and C. As two distinct hyperbolas can not intersect in more than four points, there are at most 4(d + 1)2 points X.